package edu.xmut.yuepai.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 发布约拍表
 *
 * @TableName publish
 */
@TableName(value = "publish")
@Data
public class Publish implements Serializable {
    /**
     * 主键id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 发布者id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 类型（0-约模特，1-约摄影师，2-约其他）
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 发布的标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 发布地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 详细地址
     */
    @TableField(value = "full_address")
    private String fullAddress;

    /**
     * 经度
     */
    @TableField(value = "lon")
    private BigDecimal lon;

    /**
     * 纬度
     */
    @TableField(value = "lat")
    private BigDecimal lat;

    /**
     * 浏览量
     */
    @TableField(value = "pv")
    private Integer pv;

    /**
     * 状态（0-草稿，1-已发布，2-约拍成功）
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 发布时间
     */
    @TableField(value = "publish_time")
    private LocalDateTime publishTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}